<extend name="Public/layout"/>
<block name="head">
    <link rel="stylesheet" href="__PUBLIC__css/trade-details.css">
        <style type="text/css">
        .footer{
            display: none;
        }
        </style>
</block>
<block name="main">
    <div class="header">
        <div class="left"><span>交易类型/时间</span></div>
        <div class="right" onclick="showMask()">
            <span>金额/元</span>
            <span>
                <i class="icon-dropmenu"></i>
            </span>
        </div>
    </div>
    <div class="content">
        <ul class="list-wrapper" id="bill">
		
		<notempty name="bill.0.id">
            <foreach name="bill" item="v">
                <li class="list-item">
                    <a href="{:U('Person/trade_details_info',array('id'=>$v['id']))}">
                        <div class="left">
                            <p class="item-name">{$v.type}</p>
                            <p>
                                <span class="item-date">{$v.notice_date}</span>
                                <span class="item-time">{$v.notice_time}</span>
                            </p>
                        </div>
                        <div class="right">
                            <div class="item-money"><if condition="$v.status eq 0">+{$v.quota}<else/>-{$v.quota}</if></div>
                            <div class="arrow-wrapper">
                                <span class="arrow-right"></span>
                            </div>
                        </div>
                    </a>
                </li>
            </foreach>
		<else/>
			<div style="width:100%; text-align:center; margin-top:1rem"> <img src="__PUBLIC__images/no-shuju.png"></div>
			<span style="width:100%; display:block; font-size:0.4rem; text-align:center;">暂无数据</span>
		</notempty>
		
		
        </ul>
    </div>

    <div class="mask" onclick="closeMask()">
        <ul class="dropmenu">
            <li class="drop-item" data-type="0" onclick="selectItem(0)">全部明细</li>
            <li class="drop-item" data-type="1" onclick="selectItem(1)">首投返利</li>
            <li class="drop-item" data-type="2" onclick="selectItem(2)">加息返利</li>
            <li class="drop-item" data-type="3" onclick="selectItem(3)">提现记录</li>
        </ul>
    </div>
</block>
<block name="js">
    <script>
        function showMask() {
            $(".mask").css({"display": "block"})
        }

        function closeMask() {
            $(".mask").css({"display": "none"})
        }

        function selectItem(val) {
            $.post('{:U("Person/invest_list")}',{val:val},function(res) {
                $('#bill').html(res.content);
            });
        }
    </script>
</block>